#include <regx52.h>
#include "delay.h"
unsigned char key_Count()
{
 unsigned char count=0;
if(P3_1==0){Delay(20);while(P3_1==0);Delay(20);count=1;}
if(P3_0==0){Delay(20);while(P3_0==0);Delay(20);count=2;}
if(P3_2==0){Delay(20);while(P3_2==0);Delay(20);count=3;}
if(P3_3==0){Delay(20);while(P3_3==0);Delay(20);count=4;}

return count;

}